﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HA.ModFlow.Domain.FileLayer
{
    public  class DisStep
    {

        public DisStep(double plen,int  nstp,double mult,bool isSteady)
        {
            this._PERLEN = plen;
            this._NSTP = nstp;

            this._TSMULT = mult;

            this._isSteadyState = isSteady;
 
        }



        double _PERLEN;

        /// <summary>
        /// 周期长度
        /// </summary>
        public double PERLEN
        {
            get { return _PERLEN; }
            set { _PERLEN = value; }
        }

        int _NSTP;

        /// <summary>
        /// 时间步数
        /// </summary>
        public int NSTP
        {
            get { return _NSTP; }
            set { _NSTP = value; }
        }

        double _TSMULT;

        public double TSMULT
        {
            get { return _TSMULT; }
            set { _TSMULT = value; }
        }

        //perlen nstp tsmult ss/tr

        //表示瞬时或者稳态
        bool _isSteadyState;


        /// <summary>
        /// 输出文件时。SS,TR
        /// </summary>
        public bool IsSteadyState
        {
            get { return _isSteadyState; }
            set { _isSteadyState = value; }
        }

        /// <summary>
        /// this method return String for write inputFile.
        /// </summary>
        /// <returns></returns>
        public string GetString()
        {
            string str = "";
            if (_isSteadyState)
            {
                str += _PERLEN.ToString(" 0.00000e+00  ") + string.Format("{0,10}", _NSTP) + _TSMULT.ToString("   0.00000e+00  ") + "  SS            PERLEN NSTP TSMULT SS/TR\r\n";
            }
            else
            {
                str += _PERLEN.ToString(" 0.00000e+00  ") + string.Format("{0,10}", _NSTP) + _TSMULT.ToString("   0.00000e+00  ") + "  TR            PERLEN NSTP TSMULT SS/TR\r\n";
            }

            return str;
        }

        
    }
}
